﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Main
{
    public class Input
    {
        private Drawer _Drawer;

        public Input(Drawer drawer)
        {
            _Drawer = drawer;
        }


        public void GetInput()
        {
            Console.SetCursorPosition(0, 23);
            var key = Console.ReadKey();


            switch (key.Key)
            {
                case ConsoleKey.UpArrow:                    
                    _Drawer.MovePlayer(EMov.Up);
                    break;
                case ConsoleKey.DownArrow:
                    _Drawer.MovePlayer(EMov.Down);
                    break;
                case ConsoleKey.LeftArrow:
                    _Drawer.MovePlayer(EMov.Left);
                    break;
                case ConsoleKey.RightArrow:
                    _Drawer.MovePlayer(EMov.Right);
                    break;

                default:
                    break;
            }
        }
    }
}
